package com.njtoyo.taxi.admin.service.business.driver;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njtoyo.taxi.admin.mapper.master.entity.Driver;
import com.njtoyo.taxi.admin.rest.presenter.business.driver.*;
import com.njtoyo.taxi.admin.rest.wrapper.business.canton.RegionUpdateWrapper;
import com.njtoyo.taxi.admin.rest.wrapper.business.driver.*;
import com.njtoyo.taxi.entity.backend.AdminUser;
import com.taxi.entity.common.RestResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface DriverService {
    RestResult<Page<DriverListPresenter>> getList(AdminUser adminUser, DriverQueryWrapper wrapper);

    RestResult<DriverDetailsPresenter> driverDetails(Long id);

    RestResult updateDriverInformation(Long id, UpdateDriverInformationWrapper updateDriverNameWrapper);

    RestResult updatePlateNumber(Long id, UpdatePlateNumberWrapper updateDriverNameWrapper);

    RestResult updatePhoneNumber(Long id, UpdatePhoneNumberWrapper updatePhoneNumberWrapper);

    RestResult updatePassword(Long id);

    RestResult deleteCache(DeleteCaheWrapper wrapper);

    RestResult register(DriverRegisterWrapper wrapper);

    RestResult updateSwitchTaxis(MultipartFile file) throws IOException;

    RestResult batchRegister(MultipartFile file, DriverBatchRegisterWrapper wrapper) throws IOException;

    RestResult leave(Long id, LeaveDateWrapper leaveWrapper);

    RestResult<?> unleave(Long id);

    RestResult<List<DriverQueryLikeListPresenter>> getListLike(DriverLikeQueryWrapper wrapper);

    RestResult<List<DriverQueryRideClickFarmingListPresenter>> getRideClickFarmingList(RideClickFarmingQueryWrapper wrapper);

    void rideClickFarmingExport(RideClickFarmingQueryWrapper wrapper, HttpServletResponse response) throws IOException;

    void downloadDriver(DriverExportWrapper wrapper, HttpServletResponse response) throws IOException;

    RestResult batchIsBlock(DriverBatchUnblockWrapper driverBatchUnblockWrapper);

    RestResult<DriverServiceStatePresenter> getServiceState(Long id);

    RestResult setOffline(Long id);

    RestResult<DriverAccountPresenter> getAccount(Long id);

    RestResult deleteDriver(Long id);

    RestResult<IPage<DriverRecommendationListPresenter>> getRecommendationList(Long id, DriverRecommendationQueryWrapper wrapper);

    RestResult<RecommendationDetailPresenter> getRecommendationDetail(Long id);

    RestResult<DriverSimpleInfoPresenter> simpleInfo(Long id);

    RestResult compensateRecommender(compensateCustomerWrapper wrapper);

    RestResult compensateCustomerFirstRide(compensateCustomerWrapper wrapper);

    RestResult<IPage<DriverRecommendationDriverListPresenter>> getRecommendationDriverList(Long id, DriverRecommendationDriverQueryWrapper wrapper);

    // 司机推广任务奖励
    RestResult<IPage<DriverRecommendTaskListPresenter>> driverTask(Long driverId, DriverRecommendTaskListQueryWrapper wrapper);

    RestResult<DriverRecommendTaskDetailPresenter> driverTaskDetail(Long id);


    RestResult getAutomaticList(AdminUser adminUser, DriverQueryWrapper wrapper);

    RestResult closeAutomatic(String ids);

    RestResult queryByTaxi(String plateNumber);

    RestResult updateRegion(Long id, UpdateDriverRegionWrapper updateDriverRegionWrapper);

    RestResult openAutomatic(String ids);

    RestResult queryByName(String driverName);
}
